package sicnu.cs.aps.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author chengke
 * @version 1.0
 * @className TeamMemberInvite
 * @description 邀请成员信息表（t_team_memeber_invite）实体类
 * @date 2022/5/30 9:33
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "t_activity_team_member_invite")
public class ActivityTeamMemberInvite {
    private static final long serialVersionUID = -10112410981913303L;

    /**
     * 邀请记录id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 队长id
     */
    private Long userId;

    /**
     * 邀请类型，0代表未知，1代表邀请成员，2代表邀请指导老师
     */
    private int type;

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 邀请token
     */
    private String token;

    /**
     * 邀请token过期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date tokenValidTime;

    /**
     * 邀请记录创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}